<juci-layout-with-sidebar>
	<div ng-controller="ServiceSambaPage">
		<juci-config-section title="{{'General Settings'|translate}}">
			<juci-config-info>{{ 'services.samba.info' | translate }}</juci-config-info>
			<div ng-if="samba_not_installed" class="alert alert-danger" translate>Samba is not installed on this system</div>
			<juci-config-lines ng-if="!samba_not_installed">
				<juci-config-line title="{{'Name'|translate}}">
					<input type="text" ng-model="config.name.value" class="form-control" placeholder="{{'Name'|translate}}"/>
				</juci-config-line>
				<juci-config-line title="{{'Workgroup'|translate}}">
					<input type="text" ng-model="config.workgroup.value" class="form-control" placeholder="{{'Workgroup'|translate}}"/>
				</juci-config-line>
				<juci-config-line title="{{'Description'|translate}}">
					<input type="text" ng-model="config.description.value" class="form-control" placeholder="{{'Description'|translate}}"/>
				</juci-config-line>
				<!--<juci-config-line title="{{'Share User Home Directory'|translate}}">
					<switch ng-model="config.homes.value" class="green"></switch>
				</juci-config-line>-->
				<juci-config-line title="{{'Interface'|translate}}" help="{{'the interface(s) samba will listen on. Samba will not start if no interface is selected'|translate}}">
					<dropdown-multi-select input-model="data.networks" output-model="data.output" button-label="label" item-label="label" tick-property="selected"></dropdown-multi-select>
				</juci-config-line>
			</juci-config-lines>
		</juci-config-section>
		<juci-config-section title="{{'Samba Shares'|translate}}" ng-if="!samba_not_installed">
			<juci-config-info >{{'samba.shares.info'|translate}}</juci-config-info>
			<juci-list-editor ng-items="shares" 
				item-editor="samba-share-edit" 
				get-item-title="getSambaShareTitle($item)"
				on-create="onCreateShare()"
				on-delete="onDeleteShare($item)"></juci-list-editor>
		</juci-config-section>
		<juci-config-section title="{{'Samba Users'|translate}}" ng-if="!samba_not_installed">
			<juci-config-info >{{'samba.users.info'|translate}}</juci-config-info>
			<juci-list-editor ng-items="users" 
				item-editor="samba-user-edit" 
				get-item-title="$item.user.value"
				on-create="onCreateUser()"
				on-delete="onDeleteUser($item)"></juci-list-editor>
		</juci-config-section>
	</div>
</juci-layout-with-sidebar>
